/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mobile;

import turnover.Company;
import util.Date;
import util.Time;

/**
 *
 * @author Alberto
 */
public class Call {

    private Company Operador;
    private long mobile;
    private Time duration;
    private Time start;
    private double cost;
    private Date date;

    public Call(Company Operador, long mobile, Time duration, Time start, Date date, double cost) {
        this.Operador = Operador;
        this.mobile = mobile;
        this.duration = duration;
        this.start = start;
        this.cost = cost;
        this.date = date;
    }

    public Call(){

    }

    public Company getOperador() {
        return Operador;
    }
    
    public void setOperador(Company Operador) {
        this.Operador = Operador;
    }

    public Time getDuration() {
        return duration;
    }

    public void setDuration(Time duration) {
        this.duration = duration;
    }

    public long getMobile() {
        return mobile;
    }

    public void setMobile(long mobile) {
        this.mobile = mobile;
    }

    public Time getStart() {
        return start;
    }

    public void setStart(Time start) {
        this.start = start;
    }

    public double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        this.cost = cost;
    }

    public boolean isSpecial(){
        return (mobile > 900000000 && mobile < 910000000);
    }

    public boolean isMobile(){
        return (this.mobile > 600000000 && this.mobile < 700000000);
    }

    public boolean isFixedLineTelephone(){
        return (this.mobile > 910000000);
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public Object clone() throws CloneNotSupportedException{
        Call clone = new Call();
        clone.Operador = (Company)this.Operador.clone();
        clone.date = (Date)this.date.clone();
        clone.duration = (Time)this.duration.clone();
        clone.start = (Time)this.start.clone();
        clone.cost = this.cost;
        clone.mobile = this.mobile;
        return clone;
    }

}
